#include <iostream>
#include <cstring>
using namespace std;
char s[5000];
int a[5000],b,c[5000];
int na,nc;
int main()
{
	cin>>s+1;
	int na=strlen (s+1);
	for (int i=1;i<=na;i++)
		a[i]=s[na-i+1]-'0';
	cin>>b;
	nc=na;
	for (int i=1;i<=nc;i++)
		c[i]=a[i]*b;
	for (int i=1;i<=nc;i++)
		if (c[i]>9)
		{
			c[i+1]+=c[i]/10;
			c[i]%=10;
			nc++;
		}
	while (c[nc]==0&&nc>1)
		nc--;
	for (int i=nc;i>=1;i--)
		cout<<c[i];
	return 0;
}
